﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Autofac;
using Microsoft.Practices.ServiceLocation;

namespace AutofacDemo
{
   public class dosomething
    {
       public void DoStuff()
       {
           var service1 = ServiceLocator.Current.GetInstance<Interface1>("id4");
           Console.WriteLine(service1.console());
           var service2 = ServiceLocator.Current.GetInstance<Interface2>("id2");
           Console.WriteLine(service2.write());
       }
    }
}
